
const db = require('../serve/db.js')
function result(status,data,msg){
    this.status = status;
    this.data = data || {};
    this.msg = msg;
}

function find(req,res){
    let where = req.query.where||{hash:null};
    if(!form){
        res.send(new result(110,'','未定义查询条件'));
        return
    }
    db.find('artical',JSON.parse(where),function(r){
        res.send(new result(200,r,'成功'))
    });
}
module.exports = find